package com.study.concurrent;

/**
 * Description:
 * User: 27010
 * DateTime: 2018/6/10 19:58
 */
public class SynchronizedExample2 {
    private int a = 0;

    public synchronized void writer() { //1
        a++;                //2
    }                       //3

    public void reader() { //4
       int i=a;           //5
       //....               //6
    }
}
